﻿Imports System.Collections

Partial Class Clearcache
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        'Clear Cache
        For Each i As DictionaryEntry In Cache
            Cache.Remove(i.Key.ToString())
        Next

        'User feedback
        litDate.Text = DateTime.Now.ToString()

        'No-caching for this page
        Response.Expires = 0
        Response.Cache.SetNoStore()
        Response.AppendHeader("Pragma", "no-cache")
        Response.AddHeader("cache-control", "private")

    End Sub
End Class
